/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cpe;

import GUI.CpePanel;
import GUI.WelcomePanel;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.WindowAdapter;
import javax.swing.UIManager;

/**
 *
 * @author kevin
 */
public class Start {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args){
        try {
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
        } catch (Exception ex) {
            ex.printStackTrace();
        }

        WelcomePanel welcomePanel = new WelcomePanel();
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        final CpePanel gui = new CpePanel();
        gui.addWindowListener(new WindowAdapter() {

            public void windowClosing() {
                gui.dispose();
                System.exit(0);
            }
        });
        gui.setDefaultCloseOperation(CpePanel.EXIT_ON_CLOSE);
        gui.setSize(1000, 700);
        gui.setLocation((screenSize.width - gui.getWidth()) / 2, (screenSize.height - gui.getHeight()) / 2);
       
       welcomePanel.setVisible(false);
       welcomePanel.dispose();
       gui.setVisible(true);
       gui.setAlwaysOnTop(true);
       gui.setAlwaysOnTop(false);
       
        
        

        


    }
}
